package com.liliang.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class Webconfig implements WebMvcConfigurer {

//    //拦截
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new Logininterceptor())
//                .addPathPatterns("/**")
//                .excludePathPatterns("/emp/","/emp/dologin","/css/**","/images/**","/js/**");
//    }

    //批量映射
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("planman/pclass_select.html").setViewName("planman/pclass_select");
        registry.addViewController("planman/wangyeduihakuang.html").setViewName("planman/wangyeduihakuang");
        registry.addViewController("planman/Order_find_list.html").setViewName("planman/Order_find_list");
        registry.addViewController("planman/Order_ytb_list.html").setViewName("planman/Order_ytb_list");
        registry.addViewController("planman/STOCK_select.html").setViewName("planman/STOCK_select");
        registry.addViewController("planman/Stock_xiada.html").setViewName("planman/Stock_xiada");
        registry.addViewController("planman/Stock_weitg.html").setViewName("planman/Stock_weitg");
        registry.addViewController("planman/STOCK_findbyid.html").setViewName("planman/STOCK_findbyid");
        registry.addViewController("planman/index.html").setViewName("index");
        registry.addViewController("planman/leftRequire2").setViewName("leftRequire2");
        registry.addViewController("RegistAndLogin.html").setViewName("RegistAndLogin");
    }
}
